chore: implement audit maintainability recommendations#1188
Conversation
- Decompose ClinicalDashboard.tsx by extracting notices - Lazy-load admin tools and UploadPanel via next/dynamic - Extract indexing-v3-agent string tools to utils.ts to meet 2191 line budget - Fix check-github-action-pins.mjs syntax duplication
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Important Review skippedToo many files! This PR contains 109 files, which is 9 over the limit of 100. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (109)
You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b86391139
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (data.searchable !== false || retainForDocumentView) { | ||
| insertedImages.push({ |
There was a problem hiding this comment.
Keep display-only images out of the retrieval list
When a table/page region falls below the caption budget but is retained for document viewing, it is persisted with searchable: false and then added to insertedImages here. That collection is subsequently passed to buildChunks, buildVisualDocumentIndexUnitInputs, table-fact generation, and supplemental embeddings, while its length is also treated as the searchable imageCount; therefore placeholder captions can enter retrieval and a generation containing no chunks or searchable images can bypass the empty-index safeguard. Maintain a separate display-only collection, and prove with a below-budget page_region test that it creates neither retrieval units nor a nonzero searchable image count; this retrieval behavior change also requires the repository's canary procedure.
AGENTS.md reference: AGENTS.md:L256-L259
Useful? React with 👍 / 👎.
| navigateToMode(searchMode, { focus: true }); | ||
| } | ||
| }} | ||
| onMobileBack={() => router.back()} |
There was a problem hiding this comment.
Route information-page back actions to an in-app fallback
On a phone, directly opening an information page such as a form or service detail after visiting an external site makes this shared back action call router.back(), which exits the application; with no prior history it may do nothing. The removed implementation deliberately routed each information-page family to its in-app parent, so use those canonical fallbacks rather than browser history and cover a direct-entry click in the header test.
AGENTS.md reference: AGENTS.md:L192-L195
Useful? React with 👍 / 👎.
|
Closing as superseded by #1213. Final review of tip |
|
Closed as superseded by #1213 — clean rebuild of the intentional maintainability remediation on current |
Supersedes #1188. Extracts dashboard notices, lazy-loads admin tools, extracts indexing-v3 utils, and hardens Sheet autofocus for late-mounted Find fields.
Summary
This PR safely implements the actionable decomposition and refactoring recommendations from the recent system audit.
Changes Included
dashboard-notices.tsxto fit within the 4140 line budget limit.ClinicalDashboard.tsx.indexing-v3-agent/index.tstoutils.tsto respect the strict 2191 line limit.check-github-action-pins.mjs.package.jsonandknip.jsonconfiguration where stale.Excluded Changes
rag.tswas excluded from decomposition since it is well within its maintainability budget (4919/5030 lines) and is protected by strict RAG ranking governance. Any change torag.tswould require a live eval-canary before/after pair (doc/content recall pinned 1.0, zero per-case rr regressions).RAG impact: no retrieval behaviour change — refactor only.